
function Tool(){
}

Tool.createTip = function(layer, txt, param){
	param = param || {}
	param.size = param.size || 14;
	param.color = param.color || cc.c3b(200,0,0);
	param.time = param.time || 5;
	
	var label = cc.LabelTTF.create(txt, S_TIP_FONT, param.size);
	var sz = cc.Director.getInstance().getWinSize();
	label.setPosition(cc.p(sz.width/2, sz.height-50));
	label.setColor(param.color);
	layer.addChild(label, 100);
	
	label.runAction(cc.Sequence.create(cc.FadeOut.create(param.time), cc.CallFunc(label.removeFromParent,label, true)));
}